1. Field of the Invention
The present invention relates to an image coding device and an image coding method for coding images. More particularly, it relates to such appliances as image record device, player, mobile telephone, and digital camera using these device and method.
2. Description of the Related Art
As methodological technique for recording and transmitting large capacity of image and voice information in such-a manner that the image and voice information are coded into digital data, coding schemes such as MPEG (: Moving Picture Experts Group) have been defined and established. MPEG has already become the coding scheme of international standard as MPEG-1 Standard, MPEG-2 Standard, and MPEG-4 Standard. Also, as scheme for enhancing compression ratio, schemes such as H. 264/AVC (: Advanced Video Coding) are defined. These schemes have been employed as coding schemes in such equipments and appliances as digital satellite broadcast, DVD, mobile telephone, and digital camera. At present, these schemes are coming into wider and wider range in use, and are becoming increasingly close and familiar to the general public.
In the image coding schemes like this, prediction coding among frames plays an important and significant role in enhancing the compression ratio. This inter-frame prediction coding is the following scheme: A coding-target frame is coded by predicting this coding-target frame from an already-coded reference frame. In the above-described standards such as MPEG and H. 264, the inter-frame prediction coding is implemented by making motion prediction in the unit of a constant-sized block which is referred to as “macro block”. This motion prediction is the following scheme: The coding-target macro block is superimposed on the reference frame within a constant motion search range, and then, a position which leads to the best compression efficiency is searched for as a motion vector. In the inter-frame prediction coding, the motion vector searched for by the motion prediction, and a difference between the coding-target macro block and the reference frame when this motion vector is applied thereto, will be coded and transmitted.
As concrete schemes for carrying out the motion prediction, there exist full-search method which will make the search within the whole of a predetermined motion search range, and high-speed search method which will make the search within the predetermined motion search range sparsely in a step-by-step manner. The full-search method will check all of the vectors which are to become candidates. This characteristic makes it possible to select the motion vector which leads to the best compression efficiency, but results in a problem that the processing throughput becomes enormous. Meanwhile, the high-speed search method is the scheme which will check the candidate vectors in a step-by-step manner. This characteristic makes it possible to perform the processing at high speed and with height of the compression efficiency maintained. As the most representative scheme of the high-speed search method, step search method can be mentioned. Examples of the step search method are Three-Step Search (: 3SS) disclosed in T. Koga, K. Iinuma, A. Hirano, Y. Iijima, and T. Ishiguro: “Motion Compensated Inter-Frame Coding for Video-Conferencing”, Proc. NTC81 (November 1981), and Four-Step Search (: 4SS) disclosed in L. M. Po and W. C. Ma: “A Novel Four-Step Search Algorithm for Fast Block Motion Estimation”, IEEE Trans. Circuits System, Video Technology (June, 1996).
FIG. 2 illustrates an example of 3SS. In this scheme, at first, with respect to candidates for motion vectors at sample points positioned at constant distances from a start point of the search, measurements on the errors are performed. Next, points which respectively lead to the smallest errors are selected, thereby narrowing the sample-point spacings gradually. Finally, a motion vector which results in the smallest error from among the inspected candidate vectors is selected. In FIG. 2, {circle around (1)}, {circle around (2)}, and {circle around (3)} respectively indicate the positions of the motion vectors measured at the respective steps. Also, the grayed-out numbers respectively indicate the motion vectors selected at the respective steps. As illustrated in FIG. 2, at the first step, the second step, and the third step respectively, the candidate vectors with the small errors are respectively determined while narrowing the sample-point spacings with the candidate vectors selected at the respective steps used as the centers. In many cases, the sample-point spacings at the first step are generally set at an order of the one-half the maximum motion search range.
FIG. 3 illustrates an example of 4SS. In this scheme, at the first step, in much the same way as the case of 3SS, measurements on the errors are performed with respect to candidate vectors at sample points positioned at constant distances from a start point. Next, at the second step and the third step, measurements on the errors of the candidate vectors are performed with respect to three sample points in such a manner as to be extended in outward directions from a selected candidate vector. When no candidate vectors with small errors are found out even if the sample points have been extended in the outward directions, 4SS proceeds to the fourth step. At this step, a motion vector with a small error is searched for with the selected candidate vector used as the center.
The step search method always selects the sample points with the constant sample-point spacings set therebetween. This has resulted in a problem that the method reflects none of movement characteristics of an image and thus brings about a low accuracy. In contrast thereto, as the scheme resulting from improving the step search method, scheme disclosed in JP-A-11-215503 can be mentioned. In the present scheme, technology is described that movement amount in proximity to a coding-target area is measured in the step search method, and that the search range for vector search is changed in response to this movement amount measured.